class Purchase < ActiveRecord::Base

  belongs_to :receipt
  belongs_to :item
  
  validates_presence_of :receipt
  validates_presence_of :item
  validates_presence_of :quantity
  validates_presence_of :price
  
  validates_numericality_of :price, :message=>"is not monetary"
  validates_numericality_of :quantity
  validates_numericality_of :tax_rate
  validates_numericality_of :coupon, :message=>"is not monetary"

end
